package com.ygqh.baby.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.ActionProduct;
import com.ygqh.baby.po.ActionProductExample;

public interface ActionProductMapper {
	int countByExample(ActionProductExample example);

	int deleteByExample(ActionProductExample example);

	int deleteByPrimaryKey(Long id);

	int insert(ActionProduct record);

	int insertSelective(ActionProduct record);

	List<ActionProduct> selectByExample(ActionProductExample example);

	ActionProduct selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") ActionProduct record, @Param("example") ActionProductExample example);

	int updateByExample(@Param("record") ActionProduct record, @Param("example") ActionProductExample example);

	int updateByPrimaryKeySelective(ActionProduct record);

	int updateByPrimaryKey(ActionProduct record);

	int countSuper(@Param("actionId") Long actionId, @Param("q") String q);

	List<ActionProduct> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("actionId") Long actionId, @Param("q") String q);

	ActionProduct selectBySkuCode(String skuCode);

	int updateSkuStock(@Param("actionId") Long actionId, @Param("skuCode") String skuCode, @Param("amount") Long amount, @Param("operation") String operation);

	int addBatch(@Param("productList") List<ActionProduct> productList);

}
